package com.pzr.soccer.match.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.NavigableMap;
import java.util.TreeMap;

@Document
@Data
public class Game implements Serializable {
	
	private String id;

	//加上具体的json序列化类，避免redis操作失败
	@JsonSerialize(using= LocalDateTimeSerializer.class)
	@JsonDeserialize(using = LocalDateTimeDeserializer.class)
	//@JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
	private LocalDateTime kickOff;

	private String league="";
	private String home="";
	private String away="";
	private String score="";
	private String corner="";
	private String shot="";
	private String danger="";
    private String strongTeam="";
    private String halfCorner="";

	private String yanPan="";
	private String jiaoQiuPan="";
	private String jiaoQiuDaXiao="";
	private String daXiaoPan="";
	private String daXiao="";

	private int homeYellow;
	private int homeRed;
	private int awayYellow;
	private int awayRed;
    
    //记录每分钟的比分 角球 射门 危险进攻

/*    private Map<String,List<Integer>> pairScore=new LinkedHashMap<>();
    private Map<String,List<Integer>> pairCorner=new LinkedHashMap<>();
    private Map<String,List<Integer>> pairShot=new LinkedHashMap<>();
    private Map<String,List<Integer>> pairDanger=new LinkedHashMap<>();*/

    private NavigableMap<Integer,int[]> pairScore=new TreeMap<>();
    private NavigableMap<Integer,int[]> pairCorner=new TreeMap<>();
    private NavigableMap<Integer,int[]> pairShot=new TreeMap<>();
    private NavigableMap<Integer,int[]> pairDanger=new TreeMap<>();

}
